<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>盒子环绕一圈小案列</title>
  <style>
    div {
      width: 150px;
      height: 100px;
      /* 你好 */
      background: skyblue;
      transition: all 1s;
    }

    /* 1. 定义动画序列 */
    @keyframes move {
      /* 绕一圈 */
      0% {
        transform: translate(0, 0);
      }

      25% {
        transform: translate(1200px, 0) rotate(360deg);
      }

      50% {
        transform: translate(1200px, 800px);
      }
      
      75% {
        transform: translate(0, 800px) rotate(360deg);
      }

      100% {
        transform: translate(0, 0);
      }
    }

    div {
      /* 调用指定动画名称 */
      animation-name: move;

      /* 持续时间 */
      animation-duration: 5s;
    }
  </style>
</head>

<body>

  <div>
    <h3>我是一个移动怪</h3>
  </div>

</body>

</html>